<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>通过id查找一个对象</title>
	</head>
	<body>
		
		姓名：<input type="text" name="username" value="frank" />
		
		<input type="hidden" name="wage" value="2000"/>
	</body>
	<script type="text/javascript" src="js/jquery-1.4.1.js" ></script>
	<script>
		
		//onload方法
		$(function(){
			
			var username= $("input[name='username']").val();
			var wage= $("input[name='wage']").val();
			
			$.ajax({
				url:"json.do?username="+username,	
				success:function(data){
					var  jsonObject =eval("("+data+")");
					console.log(jsonObject.age);
					console.log("后台请求成功.....");
				}
			});
			
		});
		
	</script>
</html>
